<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name=viewport content="with=device-width,initial-scale=1.0">
<link href="../resource/bootstrap/css/bootstrap.min.css"
	rel="stylesheet">
<link href="../resource/css/basic.css" rel="stylesheet">
<script src="../resource/js/jquery.min.js"></script>
<script src="../resource/bootstrap/js/bootstrap.min.js"></script>
<script src="../resource/js/lesson.js"></script>
<script src="../resource/js/user.js"></script>
<script>
	$(function() {
		$('#btnLogout').click(logout);
		$('#subCommit').click(doSubscribeLesson);
	});
</script>
<title>${lesson.title}</title>
</head>
<body>
	<nav class="navbar navbar-fixed-top navbar-primary" role="navigation">
		<div class="container-fluid">
			<div class="navbar-header">
				<a href="../"><img class="img-responsive"
					src="../resource/image/header3.png" /></a>
			</div>
			<ul class="user nav navbar-nav navbar-right">
				<c:choose>
					<c:when test="${user != null }">
						<li><a href="#"><i class="glyphicon glyphicon-comment"></i>
								我 的 消 息</a></li>
						<li><a href="#"
							class="dropdown-toggle gropdown-block gropdown-primary"
							data-toggle="dropdown"> <img style="height: 18px"
								src="${user.logo }" /> ${user.petName} <span class="caret"></span>
						</a>
							<div class="dropdown-menu" role="menu">
								<div class="row">
									<div class="col-xs-6">
										<dl class="col-xs-offset-2">
											<dd>
												<img class="img-circle img-responsive" src="${user.logo }" />
											</dd>
											<dt class="text-center">
												<a class="list-default" target="view_window"
													href="userCenter"> ${user.petName }</a>
											</dt>
										</dl>
									</div>

									<div class="col-xs-6">
										<ul class="list-unstyled">
											<li class="list-block"><a target="view_window"
												href="../userCenter"><i class="glyphicon glyphicon-home"></i>
													个 人 中 心</a></li>
											<li class="list-block"><a href="#"><i
													class="glyphicon glyphicon-comment"></i> 我 的 消 息</a></li>
											<li class="list-block"><a target="view_window"
												href="../userInfo"><i class="glyphicon glyphicon-user"></i>
													信 息 编 辑 </a></li>
											<li class="list-block"><a target="view_window"
												href="../userLesson"><i class="glyphicon glyphicon-book"></i>
													课 程 管 理</a></li>
											<li class="list-block"><a target="view_window"
												href="../userExamResults"><i
													class="glyphicon glyphicon-pencil"></i> 成 绩 查 询</a></li>
											<li class="list-block"><a id="btnLogout" href="#"><i
													class="glyphicon glyphicon-off"></i> 退 出 登 录</a></li>
										</ul>
									</div>
								</div>
								<div role="row"></div>
							</div></li>
					</c:when>
					<c:otherwise>
						<li><a href="../login"><i
								class="glyphicon glyphicon-user"></i> 登 陆</a></li>
						<li><a href="../regist"><i
								class="glyphicon glyphicon-cog"></i> 注 册</a></li>
					</c:otherwise>
				</c:choose>
			</ul>
		</div>
	</nav>
	<div>
		<ol class="breadcrumb">
			<li><a href="../"><i class="glyphicon glyphicon-home"></i>
					首页</a></li>
			<li><a href="../onlineLesson"><i
					class="glyphicon glyphicon-book"></i> 在线课程</a></li>
			<li class="active"><i class="glyphicon glyphicon-wrench"></i>
				${lesson.title }</li>
		</ol>
	</div>
	<div class="container-fluid">
		<div class="row">
			<div class="col-sm-12">
				<div class="panel panel-default">
					<div class="panel-body">
						<div class="col-xs-3">
							<div class="panel">
								<div class="panel-body">
									<img class="img-responsive" src="${lesson.logo }" />
								</div>
							</div>
						</div>
						<div class="col-xs-6">
							<h3>${lesson.title}</h3>
							<dl class="dl-horizontal">
								<dt>教师</dt>
								<dd>${lesson.teacher.petName}</dd>
								<dt>
									<br />
								</dt>
								<dd>
									<br />
								</dd>
								<dt>类型</dt>
								<dd>${lesson.lessonType.typeName}</dd>
								<dt>
									<br />
								</dt>
								<dd>
									<br />
								</dd>
								<dt>学生数</dt>
								<dd>${stuTotal }</dd>
								<dt>
									<br />
								</dt>
								<dd>
									<br />
								</dd>
								<dt>章节数</dt>
								<dd>${contentList.size() }</dd>
								<dt>
									<br />
								</dt>
								<dd>
									<br />
								</dd>
								<dt>课程描述</dt>
								<dd>${lessonInfo.description }</dd>
							</dl>
							<c:choose>
								<c:when test="${lessonState == 2 }">
									<a class="btn btn-danger btn-md"
										href="../lessonCenter/${lesson.id }">进 入 课 程</a>
								</c:when>
								<c:when test="${lessonState == 1 }">
									<button class="btn btn-danger btn-md">正 在 审 核</button>
								</c:when>
								<c:when test="${lessonState == 0 }">
									<button class="btn btn-danger btn-md">审 核 未 通 过</button>
								</c:when>
								<c:otherwise>
									<button id="subCommit" class="btn btn-danger btn-md"
										data-id="${lesson.id }">申 请 课 程</button>
								</c:otherwise>
							</c:choose>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="panel panel-info">
			<div class="panel-heading">课程简介</div>
			<div class="panel-body">${lessonInfo.synopsis }</div>
		</div>
		<div class="panel panel-info">
			<div class="panel-heading">课程目录</div>
			<div class="panel-body">
				<ol>
					<c:forEach items="${contentList }" var="cl">
						<li><a class="link-black" href="../lessonCenter/${lesson.id}?content=${cl.id}">${cl.title }</a></li>
					</c:forEach>
				</ol>
			</div>
		</div>
	</div>
	<footer class="navbar navbar-inverse navbar-static-bottom">
		<div class="container-fluid">
			<br />
			<div class="row">
				<div class="col-sm-3 col-sm-offset-1">
					<h4>四川交通职业技术学院在线教育</h4>
					<p>四川交通职业技术学院在线教育，让你更好的学习新知识，更便捷的学习方式</p>
				</div>
				<div class="col-sm-4 col-sm-offset-1">
					<h4>关于我们</h4>
					<span class="col-xs-4"><a href="../aboutUs">关于我们</a></span> <span
						class="col-xs-8"><a href="#">学校云</a></span> <span class="col-xs-4"><a
						href="#">联系我们</a></span> <span class="col-xs-8"><a href="#">常见问题</a></span>
					<span class="col-xs-4"><a href="#">意见反馈</a></span> <span
						class="col-xs-8"><a href="#">法律条款</a></span>
				</div>
				<div class="col-sm-3">
					<h4>关注我们</h4>
				</div>
			</div>
			<br />
			<p class="text-center">Copyright © 2015 SVTCC. All Rights
				Reserved.</p>
			<p class="text-center">四川交通职业技术学院 版权所有 | 四川交通职业技术学院在线课堂服务协议</p>
		</div>
	</footer>
</body>
</html>